/**
 * Character armory — stone/gray palette (matches News / Forum / UCP)
 */

.box.type-character,
.box.type-default:has(.character.character--stone) {
	--ch-text: #d7d0c4;
	--ch-muted: #8a8378;
	--ch-accent: #b3a26e;
	--ch-accent-soft: #d5c698;
	--ch-radius: 8px;
	--ch-border: rgba(115, 109, 98, 0.35);
	--ch-border-strong: rgba(179, 162, 110, 0.45);
	--ch-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.21), 0 1px 1px 0 rgba(0, 0, 0, 0.25);
	--ch-card: linear-gradient(165deg, rgba(51, 49, 45, 0.92) 0%, rgba(25, 23, 20, 0.96) 100%);
	--ch-panel: linear-gradient(165deg, rgba(40, 38, 34, 0.88) 0%, rgba(22, 20, 18, 0.94) 100%);

	position: relative;
	overflow: hidden;
	border: 1px solid var(--ch-border) !important;
	border-radius: var(--ch-radius) !important;
	background: var(--ch-card) !important;
	box-shadow: var(--ch-shadow) !important;
	animation: ch-fade 0.4s ease;
}

@keyframes ch-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

.box.type-character::before,
.box.type-default:has(.character.character--stone)::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: linear-gradient(180deg, #d5c698, var(--ch-accent));
	z-index: 2;
	pointer-events: none;
}

.box.type-character::after,
.box.type-character > [box-overlay],
.box.type-character > [box-overlay]::before,
.box.type-character > [box-overlay]::after,
.box.type-default:has(.character.character--stone)::after,
.box.type-default:has(.character.character--stone) > [box-overlay],
.box.type-default:has(.character.character--stone) > [box-overlay]::before,
.box.type-default:has(.character.character--stone) > [box-overlay]::after {
	pointer-events: none !important;
}

.box.type-character > .box-head,
.box.type-default:has(.character.character--stone) > .box-head {
	position: relative;
	z-index: 9;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	height: auto !important;
	min-height: var(--box-head-height, 48px);
	padding: 0.85rem 1.15rem !important;
	line-height: 1.25;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #d5c698;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
	background: linear-gradient(180deg, rgba(17, 17, 23, 0.55) 0%, rgba(17, 17, 23, 0.15) 100%) !important;
	border-bottom: 1px solid rgba(179, 162, 110, 0.18);
}

.box.type-character > .box-head::before,
.box.type-character > .box-head::after,
.box.type-default:has(.character.character--stone) > .box-head::before,
.box.type-default:has(.character.character--stone) > .box-head::after {
	content: "";
	flex: 1 1 0;
	max-width: 2.75rem;
	height: 1px;
}

.box.type-character > .box-head::before,
.box.type-default:has(.character.character--stone) > .box-head::before {
	background: linear-gradient(90deg, transparent, rgba(179, 162, 110, 0.55));
}

.box.type-character > .box-head::after,
.box.type-default:has(.character.character--stone) > .box-head::after {
	background: linear-gradient(90deg, rgba(179, 162, 110, 0.55), transparent);
}

.box.type-character > .box-head nav[aria-label='breadcrumb'],
.box.type-default:has(.character.character--stone) > .box-head nav[aria-label='breadcrumb'] {
	width: auto;
	max-width: calc(100% - 6rem);
	height: auto;
}

.box.type-character > .box-head .breadcrumb,
.box.type-default:has(.character.character--stone) > .box-head .breadcrumb {
	width: auto;
	height: auto;
	margin: 0;
	flex-wrap: wrap;
	justify-content: center;
	background: transparent;
}

.box.type-character > .box-head .breadcrumb-item,
.box.type-character > .box-head .breadcrumb-item a,
.box.type-character > .box-head .breadcrumb-item i,
.box.type-character > .box-head .breadcrumb-item svg,
.box.type-default:has(.character.character--stone) > .box-head .breadcrumb-item,
.box.type-default:has(.character.character--stone) > .box-head .breadcrumb-item a,
.box.type-default:has(.character.character--stone) > .box-head .breadcrumb-item i,
.box.type-default:has(.character.character--stone) > .box-head .breadcrumb-item svg {
	color: #d5c698 !important;
}

.box.type-character > .box-head .breadcrumb-item a:hover,
.box.type-default:has(.character.character--stone) > .box-head .breadcrumb-item a:hover {
	color: #ebe3cf !important;
}

.box.type-character > .box-body,
.box.type-default:has(.character.character--stone) > .box-body {
	padding: 0.85rem 1rem 1.15rem !important;
	position: relative;
	z-index: 9;
	overflow: visible !important;
}

.box.type-character,
.box.type-default:has(.character.character--stone) {
	overflow: visible !important;
}

.character.character--stone {
	width: 100%;
	color: var(--ch-text, #d7d0c4);
	font-family: var(--font-family-primary, Calibri, system-ui, sans-serif);
}

.character.character--stone .top-bar {
	position: relative;
	margin: 0 0 0.35rem;
	padding: 0.9rem 1rem 0.9rem 1.15rem;
	border-radius: 8px;
	border: 1px solid rgba(115, 109, 98, 0.35);
	background: linear-gradient(165deg, rgba(40, 38, 34, 0.88) 0%, rgba(22, 20, 18, 0.94) 100%);
	box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.21);
}

.character.character--stone .top-bar::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: linear-gradient(180deg, #d5c698, #b3a26e);
	pointer-events: none;
}

.character.character--stone .top-bar .avatar img {
	display: block;
	border: 2px solid rgba(179, 162, 110, 0.45);
	border-radius: 8px;
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
}

.character.character--stone .top-bar .h1 {
	margin: 0;
	font-size: 1.65rem;
	line-height: 1.15;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.character.character--stone .top-bar .border-start {
	border-color: rgba(179, 162, 110, 0.35) !important;
	color: #8a8378;
	font-size: 0.92rem;
}

.character.character--stone .top-bar a {
	color: #d5c698;
	text-decoration: none;
}

.character.character--stone .top-bar a:hover {
	color: #ebe3cf;
}

.character.character--stone hr {
	border-color: rgba(115, 109, 98, 0.35);
	opacity: 1;
	margin-top: 1.15rem !important;
	margin-bottom: 1.15rem !important;
}

.character.character--stone .section-header {
	position: relative;
	margin: 0 0 0.85rem;
	padding: 0.15rem 0 0.55rem;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #d5c698;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.character.character--stone .section-header::after {
	background: linear-gradient(90deg, rgba(179, 162, 110, 0.55), transparent);
	height: 1px;
}

.character.character--stone .section-body {
	position: relative;
	margin-bottom: 1.25rem;
	padding: 0.9rem 1rem;
	border-radius: 8px;
	border: 1px solid rgba(115, 109, 98, 0.35);
	background: linear-gradient(165deg, rgba(40, 38, 34, 0.88) 0%, rgba(22, 20, 18, 0.94) 100%);
	box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.21);
}

.character.character--stone .table {
	--bs-table-bg: transparent;
	--bs-table-striped-bg: rgba(0, 0, 0, 0.18);
	--bs-table-hover-bg: rgba(179, 162, 110, 0.1);
	--bs-table-color: #d7d0c4;
	--bs-table-striped-color: #d7d0c4;
	--bs-table-hover-color: #ebe3cf;
	margin-bottom: 0.85rem;
	color: #d7d0c4;
}

.character.character--stone .table:last-child {
	margin-bottom: 0;
}

.character.character--stone .table td,
.character.character--stone .table th {
	color: #d7d0c4;
	border-color: rgba(115, 109, 98, 0.22);
	vertical-align: middle;
	padding: 0.45rem 0.35rem;
}

.character.character--stone .table td:first-child {
	color: #d5c698;
	letter-spacing: 0.03em;
}

.character.character--stone #bars .h4 {
	margin: 0;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #d5c698;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.character.character--stone .progress {
	background: rgba(0, 0, 0, 0.45);
	border: 1px solid rgba(115, 109, 98, 0.28);
	border-radius: 4px;
}

@media (max-width: 991px) {
	.character.character--stone .top-bar .h1 {
		font-size: 1.35rem;
	}
}
